<?php

// Read the configuration file.
require_once('config.php');

// Kill any existing session.
// FIXME: This is temporary until we have a logout feature.
$_SESSION = array();
if (isset($_COOKIE[session_name()])) {
	setcookie(session_name(), '', time()-42000, '/');
}

// Load and initialize Smarty (see http://www.smarty.net).
require($smarty_source);
$smarty = new Smarty();
$smarty->template_dir = $smarty_tpl;
$smarty->compile_dir = $smarty_compile_dir;
$smarty->config_dir = $smarty_config_dir;
$smarty->cache_dir = $smarty_cache_dir;
$smarty->debugging = $smarty_dbg;

// Do stuff.
$smarty->assign('larch_name', $larch_name);
$smarty->assign('larch_name_subtitle', $larch_name_subtitle);

// Display the template.
$smarty->display('index.tpl');
?>
